<template>
  <panel title="增加账号">
    <accountForm @ruleForm="form"></accountForm>
  </panel>
</template>

<script>
import { userAddreq } from '@/api/account.api';
import accountForm from "./components/accountForm.vue";
export default {
  components: {
    accountForm,
  },

  methods:{
    form(res){
      console.log(res);
      userAddreq(res).then(res1 => {
        // console.log(res1);
        if(res1.data.code == 0){
          this.$message({
            message: res1.data.msg,
            type: "success",
          });
          this.$router.push('/account/list')
        }
        
      })
    }
  }
};
</script>

<style lang="less" scoped>
</style>